﻿@model Sharp.WebBooter.Areas.Demo.Models.ControlModel
@if (ViewBag.IsPjaxRequest == false)
{
    Layout = "~/Areas/Platform/Views/Shared/__Layout.cshtml";
}
<section class="content-header">
    <h1></h1>
</section>
<section class="content">
    <div class="box box-primary">
        <div class="box-body" id="modalcontent">
            <div class="row">
                <div class="col-md-12">
                    @using (Html.Bootstrap().BeginForm(c => c.Horizontal()))
                    {
                        @:<div class="row">
                            @Html.HiddenFor(x => x.UI.RefreshGrid)

                            <div class="col-md-6">
                                <div class="form-group">
                                    @Html.LabelFor(m => m.OrgId, new { @class = "col-md-3 col-sm-5 control-label" })
                                    <div class="col-md-9 col-sm-7">
                                        <div class="input-group">
                                            @Html.Bootstrap().TextBoxFor(m => m.OrgId).Id("OrgIdText").Attribute("readonly", "readonly")
                                            <span class="input-group-addon"><i class="fa fa-check" id="OrgIdTrigger"></i></span>
                                        </div> @Html.HiddenFor(m => m.OrgId)
                                        <div id="OrgIdMenuContent" class="menuContent" style="display: none; position: absolute; display: none; right: 15px; top: 33px; z-index: 1000;">
                                            <ul id="OrgId_Treemenu" class="ztree" style="margin-top: 0; width: 260px;"></ul>
                                        </div>
                                        <script type="text/javascript">
                                        var data = @MvcHtmlString.Create(Model.OrgIdDataSource.ToJson());
                                        var OrgIdList = new app.TreeList();
                                        OrgIdList.init(data.children, "OrgId", "@Model.OrgId","title","id");
                                        </script>@Html.Bootstrap().ValidationMessageFor(m => m.OrgId, "DropdownTreeList")
                                    </div>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    @Html.LabelFor(m => m.DropDownListField, new { @class = "col-md-3 col-sm-5 control-label" })<div class="col-md-9 col-sm-7">
                                        @Html.Bootstrap().DropdownListFor(x => x.DropDownListField).DataSource(Model.DropDownListFieldDataSource).DisplayField("Title").ValueField("Id").SelectedValue(Model.DropDownListField)
                                        @Html.Bootstrap().ValidationMessageFor(m => m.DropDownListField, "DropdownList")

                                    </div>
                                </div>
                            </div>


                        @:</div>
                    }
                </div>
                <div class="box-footer text-center box-outfooter">
                    @Html.Bootstrap().LinkButton("保存", ToolBarIco.Save).Style(BootstrapStyle.Primary).Click("window.app.saveForm(event,'" + Url.Action("Save") + "');").Hide(Model.UI.CheckReadOnlyForm())

                </div>
            </div>
        </div>
    </div>
</section>
